import request from '@/utils/request'
// 组织架构接口请求

// 获取部门列表
export function getDepartments() {
  return request({
    url: '/company/department'
  })
}

// 新增部门
export function addDepartment(data) {
  return request({
    url: '/company/department',
    method: 'post',
    data
  })
}

// 获取-部门负责人列表
export function getEmployeeSimple() {
  return request({
    url: '/sys/user/simple'
  })
}

// 获取部门详情
export function getDepartmentInfo(val) {
  return request({
    url: `/company/department/${val}`
  })
}

// 修改部门详情
export function editDepartment(data) {
  return request({
    url: `/company/department/${data.id}`,
    method: 'put',
    data
  })
}
// 删除部门详情
export function delDepartment(val) {
  return request({
    url: `/company/department/${val}`,
    method: 'delete'
  })
}
